# Directory of where GTK is installed
GTKDIR   =d:/gtkmm

#---------------------------------------------------------
#------------------ Do NOT modify below ------------------
#---------------------------------------------------------

PROGRAM  = png2ico_gui
OBJDIR   = obj
BINDIR   = bin
$(shell mkdir -p ${OBJDIR} ${BINDIR})
CC       =g++
INCLUDE  =-I$(GTKDIR)/include/gtkmm-2.4 \
          -I$(GTKDIR)/lib/gtkmm-2.4/include \
          -I$(GTKDIR)/include/giomm-2.4 \
          -I$(GTKDIR)/lib/giomm-2.4/include \
          -I$(GTKDIR)/include/pangomm-1.4 \
          -I$(GTKDIR)/lib/pangomm-1.4/include \
          -I$(GTKDIR)/include/gtk-2.0 \
          -I$(GTKDIR)/include/atkmm-1.6 \
          -I$(GTKDIR)/include/gdkmm-2.4 \
          -I$(GTKDIR)/lib/gdkmm-2.4/include \
          -I$(GTKDIR)/include/glibmm-2.4 \
          -I$(GTKDIR)/lib/glibmm-2.4/include \
          -I$(GTKDIR)/include/glib-2.0 \
          -I$(GTKDIR)/lib/glib-2.0/include \
          -I$(GTKDIR)/include/sigc++-2.0 \
          -I$(GTKDIR)/lib/sigc++-2.0/include \
          -I$(GTKDIR)/include/cairomm-1.0 \
          -I$(GTKDIR)/lib/cairomm-1.0/include \
          -I$(GTKDIR)/include/pango-1.0 \
          -I$(GTKDIR)/include/cairo \
          -I$(GTKDIR)/include/freetype2 \
          -I$(GTKDIR)/include \
          -I$(GTKDIR)/include/libpng14 \
          -I$(GTKDIR)/lib/gtk-2.0/include \
          -I$(GTKDIR)/include/atk-1.0
CFLAGS   =-Wall $(INCLUDE) -mms-bitfields -Wno-deprecated
DEBUG    =0
ifeq ($(DEBUG), 1)
CFLAGS += -DDEBUG -g3 -O0
else
CFLAGS += -O3
endif
LINC     =-L$(GTKDIR)/lib \
          -lgtkmm-2.4 \
          -latkmm-1.6 \
          -lgdkmm-2.4 \
          -lgiomm-2.4 \
          -lpangomm-1.4 \
          -lgtk-win32-2.0 \
          -lglibmm-2.4 \
          -lcairomm-1.0 \
          -lsigc-2.0 \
          -lgdk-win32-2.0 \
          -latk-1.0 \
          -lgio-2.0 \
          -lgdk_pixbuf-2.0 \
          -lpangowin32-1.0 \
          -lgdi32 \
          -lpangocairo-1.0 \
          -lpango-1.0 \
          -lcairo \
          -lgobject-2.0 \
          -lgmodule-2.0 \
          -lgthread-2.0 \
          -lglib-2.0 \
          -lintl \
          -mwindows
SYS_LIBS =


OBJS     = about_dialog.cpp \
           dialog_base.cpp \
           main.cpp \
           file_list.cpp \
           options_dialog.cpp \
           options_manager.cpp \
           png2ico_window.cpp \
           utils.cpp


ALLOBJS = $(OBJS:%.cpp=$(OBJDIR)/%.o)

ALL: $(PROGRAM)

$(PROGRAM): $(ALLOBJS)
	$(RM) $(BINDIR)/$@.exe
	$(CC) $(CFLAGS) -o $(BINDIR)/$@ $(ALLOBJS) $(RESOURCE) $(LINC) $(SYS_LIBS)
	strip -s $(BINDIR)/$@.exe

$(OBJDIR)/%.o : %.cpp
	$(CC) $(CFLAGS) -c $*.cpp -o $(OBJDIR)/$*.o

clean:
	rm -Rf $(OBJDIR) $(BINDIR) *~
